Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "/pages/home/index",
      iconPath: "/image/home.png",
      selectedIconPath: "/image/home-select.png",
      text: "首页"
    }, {
      pagePath: "/pages/calendar/index",
      iconPath: "/image/calendar.png",
      selectedIconPath: "/image/calendar-select.png",
      text: "归档"
    },
    {
      pagePath: "/pages/my/index",
      iconPath: "/image/my.png",
      selectedIconPath: "/image/my-select.png",
      text: "我的"
    }
  
  ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})